from month_8_8.Page.Page import Page
from selenium.webdriver.common.by import By
class Page1(Page):
    input_search_loc = (By.XPATH,'//*[@id="searchForm"]/div[1]/input')
    def input_search(self):
        self.send_keys(self.input_search_loc,'茅台')
        self.enter(self.input_search_loc)
    click_search_shop_loc = (By.XPATH,'/html/body/div[5]/div[2]/div[2]/div[1]/ul/li[1]/div[1]/em/a')
    def click_search_shop(self):
        self.click(self.click_search_shop_loc)
    click_search_pay_loc = (By.ID,'buy-cart')
    def click_search_pay(self):
        self.click(self.click_search_pay_loc)
    click_address_loc = (By.ID,'address-35')
    def click_address(self):
        self.click(self.click_address_loc)
    click_py_loc = (By.ID,'order-button')
    def py(self):
        self.scrollTo()
        self.click(self.click_py_loc)

    def a3mall_search_002(self):
        self.a3mall_login_001()
    def a3mall_login_004(self, username):
        self.a3mall_login_002(username)
    def a3mall_login_005(self, password):
        self.a3mall_login_003(password)
        self.input_search()
        self.click_search_shop()
        self.click_search_pay()
        self.click_address()
        self.py()